/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.Production.impl;

import EA_Model.IEC61970.Core.impl.CurveImpl;

import EA_Model.IEC61970.Domain.ActivePowerChangeRate;

import EA_Model.IEC61970.Generation.Production.ProductionPackage;
import EA_Model.IEC61970.Generation.Production.StartRampCurve;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Start Ramp Curve</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.StartRampCurveImpl#getHotStandbyRamp <em>Hot Standby Ramp</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class StartRampCurveImpl extends CurveImpl implements StartRampCurve {
	/**
	 * The cached value of the '{@link #getHotStandbyRamp() <em>Hot Standby Ramp</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHotStandbyRamp()
	 * @generated
	 * @ordered
	 */
	protected ActivePowerChangeRate hotStandbyRamp;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected StartRampCurveImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ProductionPackage.Literals.START_RAMP_CURVE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePowerChangeRate getHotStandbyRamp() {
		if (hotStandbyRamp != null && hotStandbyRamp.eIsProxy()) {
			InternalEObject oldHotStandbyRamp = (InternalEObject)hotStandbyRamp;
			hotStandbyRamp = (ActivePowerChangeRate)eResolveProxy(oldHotStandbyRamp);
			if (hotStandbyRamp != oldHotStandbyRamp) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP, oldHotStandbyRamp, hotStandbyRamp));
			}
		}
		return hotStandbyRamp;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePowerChangeRate basicGetHotStandbyRamp() {
		return hotStandbyRamp;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setHotStandbyRamp(ActivePowerChangeRate newHotStandbyRamp) {
		ActivePowerChangeRate oldHotStandbyRamp = hotStandbyRamp;
		hotStandbyRamp = newHotStandbyRamp;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP, oldHotStandbyRamp, hotStandbyRamp));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP:
				if (resolve) return getHotStandbyRamp();
				return basicGetHotStandbyRamp();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP:
				setHotStandbyRamp((ActivePowerChangeRate)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP:
				setHotStandbyRamp((ActivePowerChangeRate)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ProductionPackage.START_RAMP_CURVE__HOT_STANDBY_RAMP:
				return hotStandbyRamp != null;
		}
		return super.eIsSet(featureID);
	}

} //StartRampCurveImpl
